package com.eastmoney.emis.edda.domain.repository;

import com.eastmoney.emis.edda.domain.entity.EddaApply;
import com.eastmoney.emis.edda.domain.entity.EddaBind;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @description: Description
 * @projectName: EDDA-HSBC
 * @package: com.eastmoney.emis.edda.domain.repository
 * @author: 汪程程
 * @date: 2022/9/29 5:52 PM
 * @version: 1.0
 */
public interface HsbcEddaRepository {

    void addEddaBind(EddaBind eddaBind);

    void save(EddaBind eddaBind);

    void save(EddaApply eddaApply);

    void addEddaApply(EddaApply eddaApply);

    EddaBind findEddaBindByClientIdAndBankAccount(String clientId, String bankCode, String bankAccount);

    EddaApply findEddaApplyInProgress(String clientId, String bankCode, String bankAccount);

    EddaBind findEddaBindByClientIdAndMandateId(String clientId, String mandateId);

    EddaApply findEddaApplyByClientIdAndRegisterId(String clientId, String registerId);
    EddaApply findEddaApplyByEid(String eid);

    EddaApply findActiveEddaApplyByClientIdAndMandateId(String clientId, String mandateId);

    int getEddaApplyTimesDailyByClientId(String clientId);

    int getEddaApplyTimesDailyByClientIdAndStartTime(String clientId, LocalDateTime dateTime);

    EddaApply findFirstDailyByClientId(String clientId);

    List<EddaApply> findAllUncompleted();
}
